/*
 * GuudEvent.cpp
 *
 *  Created on: 2013-1-19
 *      Author: heqiu
 */

#include "GuudEvent.h"

namespace guud {
GuudEvent::GuudEvent() {
	m_uiMSec = 100;
	m_bQuit = false;
}
GuudEvent::~GuudEvent() {

}
void GuudEvent::setDelay(uint32_t uiMSec) {
	m_uiMSec = uiMSec;
}

void GuudEvent::beginListen() {
	m_bQuit = false;
	while (m_bQuit == false) {
		SDL_Event stEvent;
		while (SDL_PollEvent(&stEvent)) {
			if (stEvent.type == SDL_QUIT) {
				m_bQuit = true;
			}
			handleEvents(stEvent);
		}
		SDL_Delay(m_uiMSec);
	}
}

void GuudEvent::handleEvents(SDL_Event &stEvent) {

}
}
